<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <style>
      li{
        line-height: 40px
      }
      span{
        color: red
      }
    </style>
</head>
<body>
  <h2>绘制图像</h2>
  <ul>
    <li>
      如果你想把一幅图绘制到画布上，可以使用 drawImage()
    </li>
    <li>
      操作的结果可以通过 toDataURL()获得
    </li>
    <li>
      图像不能来自其他域，如果来自其他域，会跑出错误
    </li>
  </ul>
  
  
  <canvas id="drawing" width="200" height="200">A drawing of something</canvas>
  <canvas id="drawing2" width="200" height="200">A drawing of something</canvas>
  <canvas id="drawing3" width="200" height="200">A drawing of something</canvas>
  <script src="./index.js"></script>
</body>
</html>